package com.yf.springcustomtag.springsupport;

import org.springframework.beans.factory.xml.NamespaceHandlerSupport;

/**
 * @ClassName YfNamespaceHandler    自定义命名空间处理类
 * @Description TODO
 * @Author yf
 * @Date 2018/10/14 23:00
 * @Version 1.0
 */
public class YfNamespaceHandler extends NamespaceHandlerSupport {
    @Override
    public void init() {
        /**
         * registerBeanDefinitionDecorator(String elementName, BeanDefinitionDecorator dec)
         * 通过指定的BeandefiniParser解析xsd中定义的element元素
         */
        registerBeanDefinitionParser("application", new ApplicationBeanDefinitionParser(Application.class, true));
        registerBeanDefinitionParser("registry", new RegistryBeanDefinitionParser());
    }
}
